package unicamp.mc;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

public class SplashScreen extends Activity {
	
	private Thread splash;
	private SplashScreen splashScreen = this;
	
	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.splash);
        
        splash = new Thread() {
        	public void run() {
        		try{
        			synchronized (this) {
        				wait(1000);
					}
        		}catch(InterruptedException e) {}
        		finally{
        			finish();
        	
        			Intent i = new Intent();
        			i.setClass(splashScreen, MainActivity.class);
        			startActivity(i);
        			
        			this.stop();
        		}
        	}
        };
        
        splash.start();
	}
}
